//使用中括号定义数组
let list: number[]=[1,2,3];
for (let i = 0; i < list.length; i++) {
    const element = list[i];
    console.log(element);
}

console.log('==========================');

//使用包装类Array定义
let list2: Array<number>=[1,1,2,3,4,5];
for (let i = 0; i < list2.length; i++) {
    const element = list2[i];
    console.log(element);
}

console.log('==========================');

list.reverse();
for (let i = 0; i < list.length; i++) {
    const element = list[i];
    console.log(element);
}
